package com.wen.edu.controller;

import com.wen.commonutils.ResultEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：Win
 * @Date: 2021/5/26 20:07
 * @Description: 提供前端页面的登录方法和返回信息方法
 */

@RestController
@RequestMapping("/edu/service/user")
public class EduLoginController {
    //    login
    @PostMapping("login")
    public ResultEntity login() {
        return ResultEntity.ok().data("token", "admin");
    }

    //    info
    @GetMapping("info")
    public ResultEntity info() {
        return ResultEntity.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
